package vo;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import org.hibernate.annotations.GenericGenerator;

import com.fasterxml.jackson.annotation.JsonBackReference;
import com.fasterxml.jackson.annotation.JsonManagedReference;

@Entity
public class Product implements Serializable{
	@Id
	@GenericGenerator(strategy="uuid",name="myUuid")
	@GeneratedValue(generator="myUuid")
	private String id;
	private String pname;
	private double price;
	private Date makeDate;
	private int ct;
	@JsonManagedReference
	@ManyToOne
	@JoinColumn(name="p_id")
	private Base base;
	public Product() {
		super();
	}
	public Product(String id, String pname, double price, Date makeDate,
			int ct, Base base) {
		super();
		this.id = id;
		this.pname = pname;
		this.price = price;
		this.makeDate = makeDate;
		this.ct = ct;
		this.base = base;
	}
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	public String getPname() {
		return pname;
	}
	public void setPname(String pname) {
		this.pname = pname;
	}
	public double getPrice() {
		return price;
	}
	public void setPrice(double price) {
		this.price = price;
	}
	public Date getMakeDate() {
		return makeDate;
	}
	public void setMakeDate(Date makeDate) {
		this.makeDate = makeDate;
	}
	public int getCt() {
		return ct;
	}
	public void setCt(int ct) {
		this.ct = ct;
	}
	public Base getBase() {
		return base;
	}
	public void setBase(Base base) {
		this.base = base;
	}
	
	
	
	
	
}
